Skip to content

Chore: improve pop up block behaviour#256

Open
roshan-gorasia-cko wants to merge 1 commit intomasterfrom
chore/improve-pop-up-block-behaviour
Open

Chore: improve pop up block behaviour#256
roshan-gorasia-cko wants to merge 1 commit intomasterfrom
chore/improve-pop-up-block-behaviour

Conversation

@roshan-gorasia-cko
Copy link
Copy Markdown
Contributor

@roshan-gorasia-cko roshan-gorasia-cko commented Apr 13, 2026

Description

When conducting headless mode via the new APM flow, there is a chance that browsers may block the redirect (as we've seen in some Safari instances).

On this flow, we can provide a "fallback" UI where the customer is directed to press "pay" so the redirect occurs following a customer interaction.

Solution

When we detect a browser block, we emit an event to state this and also give the option to show a fallback UI to the customer so they continue the payment.

Demo

https://processout.slack.com/archives/C085M5SPTUJ/p1776085378944209?thread_ts=1774624241.259649&cid=C085M5SPTUJ

Checklist

  • I bumped the version of the project using yarn bump-version
  • I have checked the code for any potential issues
  • I tested my changes in the browser

Notes

Jira Issue

@roshan-gorasia-cko roshan-gorasia-cko force-pushed the chore/improve-pop-up-block-behaviour branch from 570aa71 to 72484c8 Compare April 13, 2026 12:52
@roshan-gorasia-cko roshan-gorasia-cko changed the title Chore/improve pop up block behaviour Chore: improve pop up block behaviour Apr 13, 2026
@roshan-gorasia-cko roshan-gorasia-cko force-pushed the chore/improve-pop-up-block-behaviour branch from dca5e5c to fe91bc4 Compare April 13, 2026 14:44
@roshan-gorasia-cko roshan-gorasia-cko marked this pull request as ready for review April 13, 2026 14:44
Copy link
Copy Markdown
Contributor

@tomasz-pazdziurek-cko tomasz-pazdziurek-cko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/apm/views/Redirect.ts
private showPopupBlockedFallbackOverlay() {
// Full-screen backdrop with centered content card
const overlay = document.createElement('div')
overlay.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;z-index:2147483647;background:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes me wonder how we managed to calculate this z-index 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants